const CracoLessPlugin = require('craco-less');

module.exports = {
  babel: {   //用来支持装饰器
    plugins: [["@babel/plugin-proposal-decorators", { legacy: true }]]
  },
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: {},
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  devServer:{
    proxy:{
      '/qq':{
        target:'https://view.inews.qq.com',
        changeOrigin:true,
        pathRewrite:{
          '^/qq':''
        }

      }
    }
  }
};